<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>

<rich:panel header="#{messages['finance.management.menu']}">
	<h:panelGrid>
		<h:outputText value="#{errorBean.errorMessage}" styleClass="error"></h:outputText>
	</h:panelGrid>
	
	<h:panelGrid width="100%">
	    <h:outputText value="#{messages['search.and.listing.result']}" styleClass="sub_header" />
	</h:panelGrid>
	
	<h:panelGrid width="300px" columns="3">
		<h:outputText></h:outputText>
		<t:message for="member" styleClass="error"></t:message>
		<h:outputText></h:outputText>
		
		<h:panelGroup>
			<h:outputLabel for="member" value="#{messages['member.label']}" styleClass="standardText_Label" />
		</h:panelGroup>
		<h:panelGroup>
		    <h:inputText id="member" value="#{memberInvListingBean.memberSearch}"></h:inputText>
		</h:panelGroup>
		<h:panelGroup>
		    <h:commandButton value="#{messages['search']}" styleClass="button" action="null" actionListener="#{memberInvListingBean.searchMemberAction}"></h:commandButton>
		</h:panelGroup>			
	</h:panelGrid>
	
	<rich:spacer height="20" />
	
	<rich:dataTable id="data" var="member" value="#{memberInvListingBean.memberList}" rows="20" width="99%" >
		<rich:column style="text-align:left;width:20%;" >
			<f:facet name="header">
				<h:outputText value="#{messages['agreement.no.column']}"></h:outputText>
			</f:facet>
			<t:commandLink action="finInvListing" immediate="true" actionListener="#{memberInvListingBean.listInvActionListener}">
				<h:outputText value="#{member.agreementNo}"></h:outputText>
			</t:commandLink>
			
			<f:param id="agreementId" value="#{member.agreementId}" />
		</rich:column>
		<rich:column style="text-align:left;width:20%;" >
			<f:facet name="header">
				<h:outputText value="#{messages['member.name.column']}"></h:outputText>
			</f:facet>
			<h:outputText value="#{member.memberName}"></h:outputText>
		</rich:column>
		<rich:column style="text-align:left;width:20%;" >
			<f:facet name="header">
				<h:outputText value="#{messages['membership.no.column']}"></h:outputText>
			</f:facet>
			<h:outputText value="#{member.memberShipNo}"></h:outputText>
		</rich:column>
		<rich:column style="text-align:left;">
			<f:facet name="header">
				<h:outputText value="#{messages['member.type.column']}"></h:outputText>
			</f:facet>
			<h:outputText value="#{member.memberType}"></h:outputText>
		</rich:column>
		<rich:column style="text-align:left;">
			<f:facet name="header">
				<h:outputText value="#{messages['member.status.column']}"></h:outputText>
			</f:facet>
			<h:outputText value="#{member.memberStatus}"></h:outputText>
		</rich:column>
		<rich:column style="text-align:left;">
			<f:facet name="header">
				<h:outputText value="#{messages['created.date.column']}"></h:outputText>
			</f:facet>
			<h:outputText value="#{member.createdDate}">
				<f:convertDateTime pattern="dd-MMM-yyyy h:mm a"/>
			</h:outputText>
		</rich:column>
	</rich:dataTable>
	
	<rich:spacer height="30" />
	
	<rich:datascroller align="left"  for="data" maxPages="20" />
	
	<rich:spacer height="30" />
	
</rich:panel>
